#pragma once

#include "lzo/lzoconf.h"
#include "CompressionAlgorithm.h"

using namespace System;
using namespace System::Collections::Generic;

namespace WaveAccess
{
	namespace LZONet
	{
		private ref class LZOCompressorHelper 
		{
		private:
			Dictionary<CompressionAlgorithm, IntPtr>^ m_CompressFuncTable;
			Dictionary<CompressionAlgorithm, IntPtr>^ m_DecompressFuncTable;
			Dictionary<CompressionAlgorithm, IntPtr>^ m_DecompressSafeFuncTable;
			Dictionary<CompressionAlgorithm, lzo_uint32>^ m_WorkMemorySizeTable;

		public:
			LZOCompressorHelper();

			String^ ResolveCompressDecompressError(int retCode);

			property Dictionary<CompressionAlgorithm, IntPtr>^ CompressFunctionTable
			{
				Dictionary<CompressionAlgorithm, IntPtr>^ get()
				{
					return m_CompressFuncTable;
				}
			}

			property Dictionary<CompressionAlgorithm, IntPtr>^ DecompressFunctionTable
			{
				Dictionary<CompressionAlgorithm, IntPtr>^ get()
				{
					return m_DecompressFuncTable;
				}
			}

			property Dictionary<CompressionAlgorithm, IntPtr>^ DecompressSafeFunctionTable
			{
				Dictionary<CompressionAlgorithm, IntPtr>^ get()
				{
					return m_DecompressSafeFuncTable;
				}
			}

			property Dictionary<CompressionAlgorithm, lzo_uint32>^ WorkMemorySizeTable
			{
				Dictionary<CompressionAlgorithm, lzo_uint32>^ get()
				{
					return m_WorkMemorySizeTable;
				}
			}
		};
	}
}

